#@datagrid()
#define head_foot()
<!-- lightbox2 -->
<link rel="stylesheet" href="/skin/ui/plugins/lightboxlib/lightbox2/css/lightbox.min.css">
#end
#define content_header()
<h1>
    网站管理员
    <small>admin tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="/admin/">管理员</a></li>
    <li class="active">网站管理员</li>
</ol>
#end
#define content()
<div class="box">
    <div class="box-header">
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-sm btn-default navbar-btn xsui-btn-add-dialog" data-url="/admin/edit" title="新增管理员">新增</button>
                <button type="button" class="btn btn-sm btn-success navbar-btn xsui-btn-refresh">刷新</button>
            </div>
            <div class="col-md-7">
                <form class="navbar-form navbar-right" action="/admin/1">
                    <div class="form-group">
                        <input type="text" name="word" class="form-control input-sm" placeholder="关键词..." title="用户名、姓名、手机号码、电子邮件" value="#(word??)">
                    </div>
                    <button type="submit" class="btn btn-sm btn-default">搜索</button>
                </form>
            </div>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="xsui-datagrid table table-condensed table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>#</th>
                    <th>用户名</th>
                    <th>角色类型</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>修改时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                #for(x : listPage.getList())
                <tr data-key="#(x.user_id)">
                    <td class="xsui-rowid" title="#(x.user_id)"></td>
                    <td><a href="/admin/edit/#(x.user_id)" class="xsui-btn-edit-dialog" title="编辑管理员 - #(x.user_name)">#(x.user_name) (#(x.realname))</a></td>
                    <td>#(x.role_title) <a href="/user/role/#(x.user_id)" class="xsui-btn-edit-dialog" title="角色设定 - #(x.user_name)"><i class="fa fa-edit"></i></a></td>
                    <td class="xsui-cell-status"><a href="/user/changeStatus?user_id=#(x.user_id)&status=varstatus" data-value="#(x.status)" title="点击隐藏" class="text-success"><i class="fa fa-check fa-fw"></i></a></td>
                    <td>#(x.create_time)</td>
                    <td>#(x.update_time)</td>
                    <td class="xsui-action-td">
                        <div class="btn-group">
                            <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#">
                                操作
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu pull-right" style="min-width: 60px">
                                <li><a href="/admin/edit/#(x.user_id)" class="xsui-btn-edit-dialog" title="编辑管理员 - #(x.user_name)"><span class="glyphicon glyphicon-edit"></span>编辑</a></li>
                                <li><a href="/user/role/#(x.user_id)" class="xsui-btn-edit-dialog" title="角色设定 - #(x.user_name)"><i class="fa fa-credit-card fa-fw"></i>角色</a></li>
                                <li><a href="/admin/doDelete/?user_id=#(x.user_id)" class="xsui-btn-delete" title="删除管理员 - #(x.user_name)"><span class="glyphicon glyphicon-remove"></span>删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                #end
            </tbody>
        </table>
        #@paginate(listPage.pageNumber, listPage.totalPage, "/admin/")
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
#end
#define body_foot()
<!-- lightbox2 -->
<script src="/skin/ui/plugins/lightboxlib/lightbox2/js/lightbox.min.js"></script>
#end